﻿using System;
using System.Runtime.Serialization;
using System.Security;

namespace RockBus.Exceptions
{
    /// <summary>
    /// Indicates an invalid message, which should not be processed any further.
    ///  No retries should be performed on the message that caused this exception.
    /// </summary>
    public class InvalidMessageException : Exception
    {
        public InvalidMessageException()
            : base()
        {
        }

        public InvalidMessageException(string message)
            : base(message)
        {
        }

        [SecuritySafeCritical]
        protected InvalidMessageException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
        }

        public InvalidMessageException(string message, Exception innerException)
            : base(message, innerException)
        {
        }
    }
}